<div class="d-flex moderation-expanded">
  <!-- report left part (report details) -->
  <div class="left">

    <!-- report metadata -->
    <div class="d-flex" *ngIf="isAdminView && abuse.reporterAccount">
      <span class="moderation-expanded-label" i18n>Reporter</span>

      <span class="moderation-expanded-text">
        <a [routerLink]="[ '.' ]" [queryParams]="{ 'search': 'reporter:&quot;' + abuse.reporterAccount.displayName + '&quot;' }"
          class="chip me-1"
        >
          <my-actor-avatar size="18" [actor]="abuse.reporterAccount" actorType="account"></my-actor-avatar>
          <div>
            <span class="muted">{{ abuse.reporterAccount.nameWithHost }}</span>
          </div>
        </a>

        <a [routerLink]="[ '.' ]" [queryParams]="{ 'search': 'reporter:&quot;' + abuse.reporterAccount.displayName + '&quot;' }"
          class="ms-auto muted abuse-details-links" i18n
        >
          {abuse.countReportsForReporter, plural, =1 {1 report} other {{{ abuse.countReportsForReporter }} reports}}
          <my-global-icon iconName="flag"></my-global-icon>
        </a>
      </span>
    </div>

    <div class="d-flex" *ngIf="abuse.flaggedAccount">
      <span class="moderation-expanded-label" i18n>Reportee</span>
      <span class="moderation-expanded-text">
        <a [routerLink]="[ '.' ]" [queryParams]="{ 'search': 'reportee:&quot;' +abuse.flaggedAccount.displayName + '&quot;' }"
          class="chip me-1"
        >
          <my-actor-avatar size="18" [actor]="abuse.flaggedAccount" actorType="account"></my-actor-avatar>
          <div>
            <span class="muted">{{ abuse.flaggedAccount ? abuse.flaggedAccount.nameWithHost : '' }}</span>
          </div>
        </a>

        <a *ngIf="isAdminView" [routerLink]="[ '.' ]" [queryParams]="{ 'search': 'reportee:&quot;' +abuse.flaggedAccount.displayName + '&quot;' }"
          class="ms-auto muted abuse-details-links" i18n
        >
          {abuse.countReportsForReportee, plural, =1 {1 report} other {{{ abuse.countReportsForReportee }} reports}}
          <my-global-icon iconName="flag"></my-global-icon>
        </a>
      </span>
    </div>

    <div class="d-flex" *ngIf="abuse.updatedAt">
      <span class="moderation-expanded-label" i18n>Updated</span>
      <time class="moderation-expanded-text abuse-details-date-updated">{{ abuse.updatedAt | date: 'medium' }}</time>
    </div>

    <!-- report text -->
    <div class="mt-3 d-flex">
      <span class="moderation-expanded-label">
        <ng-container i18n>Report</ng-container>
        <a [routerLink]="[ '.' ]" [queryParams]="{ 'search': '#' + abuse.id  }" class="ms-1 muted">#{{ abuse.id }}</a>
      </span>
      <span class="moderation-expanded-text" [innerHTML]="abuse.reasonHtml"></span>
    </div>

    <div *ngIf="predefinedReasons" class="mt-2 d-flex">
      <span>
        <a *ngFor="let reason of predefinedReasons"  [routerLink]="[ '.' ]"
          [queryParams]="{ 'search': 'tag:' + reason.id  }" class="pt-badge badge-secondary"
        >
          <div>{{ reason.label }}</div>
        </a>
      </span>
    </div>

    <div *ngIf="abuse.video?.startAt" class="mt-2 d-flex">
      <span class="moderation-expanded-label" i18n>Reported part</span>
      <span>
        {{ startAt }}<ng-container *ngIf="abuse.video.endAt"> - {{ endAt }}</ng-container>
      </span>
    </div>

    <div class="mt-3 d-flex" *ngIf="isAdminView && abuse.moderationComment">
      <span class="moderation-expanded-label" i18n>Note</span>
      <span class="moderation-expanded-text d-block" [innerHTML]="abuse.moderationCommentHtml"></span>
    </div>

  </div>

  <!-- report right part (video/comment details) -->
  <div class="right">
    <div *ngIf="abuse.video">
      <div *ngIf="abuse.video.deleted" i18n>The video was deleted</div>
      <my-embed *ngIf="!abuse.video.deleted" [video]="abuse.video"></my-embed>
    </div>

    <div *ngIf="abuse.comment" class="comment-html">
      <div>
        <strong i18n>Comment:</strong>
      </div>

      <div [innerHTML]="abuse.commentHTML"></div>
    </div>
  </div>
</div>
